﻿using YKXiangQi.Common;

namespace YKXiangQi.ViewModels
{
    public class DebugViewModel: DockableViewModel
    {
        private static readonly object obj = new object();

        public RelayCommand ClearCommand { get; private set; }

        public DebugViewModel()
        {
            Title = "Debug";
            ClearCommand = new RelayCommand(Clear);
        }

        protected void Clear(object param)
        {
            Content = string.Empty;
        }

        private string _content;
        public string Content
        {
            get
            {
                lock (obj)
                {
                    return _content;    
                }
            }
            set
            {
                lock (obj)
                {
                    _content = value;
                    RaisePropertyChanged(() => Content);    
                }
            }
        }
    }
}
